home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / MUSIUSIC / PCORGAN.LZH / MUZAKE.EXE / MUZAK.DOC < prev    next >
Text File  |  1985-11-29  |  9KB  |  205 lines

  1. MUZAK.DOC Documentation to MUZAK.BAS
  2. Version 2.11 (11/2/85)
  3. By Aaron Ross Priven
  4. Music Written by Assorted Authors
  5.  
  6.  
  7.    MUZAK.BAS is a very simple program. It plays music (or muzak if you
  8. prefer). There are lots of programs around that play music. In fact, MUZAK
  9. is entirely based on other people's programs: I did not write a single one
  10. of the .MUZ files. Rather, I took other peoples' programs and put them in
  11. MUZAK. You are asking, first of all, "Who cares? The bloody credits are all
  12. in the .MUZ files when you play them, aren't they?" and second "why do you
  13. need documentation? Hit a button when the menu comes up and it plays!"
  14.    Good questions! (After all, I did think of them myself...) This does not
  15. tell you how to run MUZAK; it tells you how to add to MUZAK. MUZAK runs on
  16. separate files, which is the important thing. That way you can add to the
  17. program without actually modifying it. There are two kinds of .MUZ files:
  18. those with words and those without. (GOODMORN and CLAVIER, respectively.)
  19. (Also there are the definition .MUZ files, but we go into that later.)
  20. Files with words are not really more complicated than those without; they
  21. are simply more lengthy.
  22.    But first, the way to create a .MUZ file. The way to create a .MUZ file
  23. is first, to get out a text editor (EDLIN or the like) and type three string
  24. constants, enclosed in quotes. The constants can be anything you want: these
  25. are the lines that appear inside the box while the music is playing. I used
  26. these as credits: First line name of the song, 2d line name of the author of
  27. the music; 3d line name of the person who programmed the music. However, you
  28. can use them any way you want. This is the first line of the file; we will be
  29. back to it later.
  30.    Now we create the music. There are two ways to do this; 1) to create it
  31. in the text editor and 2) to do it in a program. To do it in the text editor
  32. all you have to do is turn to pages 4-209 through 4-212 in your BASIC manual
  33. and use the codes there to produce something that sounds nice. (Also this is
  34. the best way to do it if you are taking the notes from sheet music.) Make a
  35. new line at least every 80 columns so that the program can test to see if <ESC>
  36. was pressed (if it is, it will go back to the menu). If you decide to put words
  37. in your music, then before each music line, put a string constant again in
  38. quotes. If you start a new music line before you want to print anything else,
  39. you must put two quotes right next to each other before the new music line; the
  40. same goes for starting a new word line before a new music line.
  41.    Suppose you had two files like this:
  42.  
  43.          must have the comma or start a new line
  44.                     v                    v
  45. "Sample with words","By Aaron Priven","Rin Tin Tin"<equal spacing NOT required>
  46. "Do ","C","Re ","D","Mi ","E","Fa ","F"           <commas can be used
  47. "Sol ","G","La ","A","Ti ","B","Do!","C2"         instead of starting
  48.                                                   a new line>
  49.  
  50.  
  51. That would print out on one line:
  52.  
  53. Do Re Mi Fa Sol La Ti Do!
  54.  
  55. To go to the next line, make the last character in the word string a vertical
  56. bar (|):
  57.  
  58. "Sample 2 with words"
  59. "By Aaron Priven"
  60. "Rin Tin Tin"
  61. "Do|"
  62. "C"
  63. "Re|"
  64. "D"             <== You can also put them on different lines like this.
  65. "Mi|"
  66. "E"
  67. "Fa|"
  68. "F"
  69. "Sol|"
  70. "G"
  71. "La|"
  72. "A"
  73. "Ti|"
  74. "B"
  75. "Do!"
  76. "C2"
  77.  
  78.  
  79. This would print:
  80.  
  81. Do
  82. Re
  83. Mi
  84. Fa
  85. Sol
  86. La
  87. Ti
  88. Do!
  89.  
  90. Here is a sample without words:
  91. "No Words","Douglas Adams","Piers Anthony"
  92. "C C# D D# E F F# G"
  93. "G# A A# B C"
  94.  
  95.    The way to make a .MUZ file from a BASIC program is first to write one.
  96. (Or download one, like I did.) Then save it into ASCII form, go into EDLIN,and
  97. type this:
  98.  
  99. 1 <ENTER>
  100. 1 OPEN "YOURFILE.MUZ" FOR OUTPUT AS #1
  101. 1,#RPLAY<CNTL-Z>WRITE#1,
  102.  
  103. If you have words in the program, also do this:
  104.  
  105. 1,#RPRINT<CNTL-Z>WRITE#1,
  106.  
  107. and then leave EDLIN. Go into BASIC, and then run the program. It will then
  108. write the music codes and words onto the YOURFILE.MUZ file. (If there were
  109. codes of the form "Xv$;" in the program where v$ is the name of a string
  110. variable change that to "<earlier codes>"+v$+"<later codes>". Similarly,
  111. if there are equals signs in the codes as such:"N=v;" or "O=v;" or the like,
  112. replace the "=v" with: "<earlier codes>"+STR$(v)+"<later codes>".)
  113. You will then have to go and write the three strings as described above.
  114. Make sure (in a file with words) that there are not two music strings or two
  115. word strings right next to each other.
  116.  
  117.    When you have got the codes and words all ready, count up the total number
  118. of MUSIC strings. Every time there is a new line or new quote after a comma,
  119. and the data inside the quote is music code, that is another count. Put this
  120. number the fourth item in the file: right after the third string whose contents
  121. go into the box. This is to tell how many times to look for music when MUZAK
  122. loads the .MUZ file.
  123.  
  124.    There is one more thing you have to do. There is a number of different .MUZ
  125. files. These are the definition files. Supplied are: INITIAL.MUZ, XMAS.MUZ,
  126. CLASSICS.MUZ, THEMES.MUZ, TEMP.MUZ, and DEFINTN.MUZ. In MUZAK version 1.0 there
  127. was only one file, DEFINTN.MUZ. In that version, there was a maximum of 40
  128. files available in MUZAK. In V2.xx there are now 1600 files possible
  129. (if you feel like dedicating that much memory to MUZAK.) The way it works is
  130. this: each music file has to be listed in a subdefintion file which has to be
  131. listed in DEFINTN.MUZ! It isn't really that complicated. First we have to have
  132. a subdefinition file. I have supplied five of these kinds of files; XMAS.MUZ
  133. contains Christmas Carols, CLASSICS.MUZ contains classical music (or muzak?),
  134. THEMES.MUZ has movie and TV themes, POPULAR.MUZ has generally miscellaneous
  135. music, and INITIAL.MUZ contains everything the other four do.  These files
  136. have the format:
  137.  
  138. WORDFLAG,"FILESPEC","Prompt"
  139.  
  140. Which means that the first item is either one or zero (if it includes words,
  141. it is a zero; if it doesn't, it is a one); the second is the name of the file;
  142. and the third is the prompt you will see when the file is displayed on the
  143. screen, or a short description of the file. An example:
  144.  
  145. 0,"YOURFILE.MUZ","My Very First File!!"
  146.  
  147.   After you have added that line to the end of the subdefinition file, you
  148. must add one to the number that serves as the first line of the file. If this
  149. number then becomes 41 or higher, you have some work to do. Do not save the   
  150. work we have done so far since "There is one more thing you have to do" and
  151. create another text file. You may call this file anything you like. Write
  152. the line described above into THIS file, add a "1" as the first line (unless
  153. there will be more than one line in the file) and then save it.
  154.  
  155. Now we get to modify DEFINTN.MUZ. Edit DEFINTN.MUZ, and add the name of the
  156. new file to the end of DEFINTN.MUZ (same method as adding a new file to a
  157. subdefintion file except leave out WORDFLAG), and add one to the number at
  158. the top of DEFINTN.MUZ.
  159.  
  160.  
  161. Congratulations! You have not only added a new file to MUZAK.BAS but gone
  162. through the worst documentation in history!!!!! Good luck in understanding
  163. it. Any comments and suggestions (particularly about documentation writing!)
  164. please leave on the Hot Rod BBS at 415-343-7498, or the Charisma BBS at
  165. 415-349-6576, both in San Mateo, CA. to me, Aaron Priven. Or you can write me
  166. at:
  167.  
  168. Aaron Ross Priven
  169. 540 Sylvan Avenue
  170. San Mateo, CA
  171. 94403-3214
  172.  
  173. I would appreciate any comments, suggestions, wisecracks, or even insults
  174. because I have heard all of ONE person saying anything about MUZAK in the
  175. months it has been distributed, and that was "Oh pretty neat."
  176. (He'll probably like it better now that some of his music is in it, but
  177. still...)
  178.  
  179. ---------------
  180. Version 1.0:  
  181.  
  182. Original version. If you still have this one, you're out of date.
  183.  
  184. ---------------
  185. Version 2.0
  186.  
  187. Adds the ability of subdefinition files to allow more than 40 .MUZ files.
  188. I thought some people might like this. Also adds the usual assortment
  189. of music.
  190.  
  191. ----------
  192. Version 2.1 adds subdefinition files XMAS.MUZ, CLASSICS.MUZ, and THEMES.MUZ,
  193. the type of music at the top of the music-playing menu, the box running
  194. the entire way across the screen, a number of new music files, and something
  195. else that I seem to have forgotten the details of. Oh well, believe me,
  196. if the program is a worm, I don't know about it!
  197.  
  198. ----------
  199. Version 2.11 adds a couple of new music files (mostly by Char Aznabul),
  200. and gets rid of that stupid "Violin Man" thing at the bottom of the box
  201. (it was only supposed to do that on a 1-in-100 chance, but obviously THAT
  202. didn't work). Anyway since I got a compiler I was wondering if you all
  203. think I should compile this program. Any response? Please?
  204. t work). Anyway since I got a compiler I was wondering if you all
  205. think I should com